<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Distribution.Simple.Program.Strip</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- This module provides an library interface to the @strip@ program.</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.Program.Strip</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Program.Strip.html#stripLib"><span class="hs-identifier">stripLib</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Strip.html#stripExe"><span class="hs-identifier">stripExe</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-14"></span><span>       </span><span class="hs-keyword">where</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.html"><span class="hs-identifier">Distribution.Simple.Program</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>             </span><span class="hs-special">(</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#takeBaseName"><span class="hs-identifier">takeBaseName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="annot"><a href="Distribution.Simple.Program.Strip.html#runStrip"><span class="hs-identifier hs-type">runStrip</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span id="runStrip"><span class="annot"><span class="annottext">runStrip :: Verbosity -&gt; ProgramDb -&gt; FilePath -&gt; [FilePath] -&gt; IO ()
</span><a href="Distribution.Simple.Program.Strip.html#runStrip"><span class="hs-identifier hs-var hs-var">runStrip</span></a></span></span><span> </span><span id="local-6989586621679689098"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689098"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679689097"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689097"><span class="hs-identifier hs-var">progDb</span></a></span></span><span> </span><span id="local-6989586621679689096"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689096"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span id="local-6989586621679689095"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679689095"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-29"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#stripProgram"><span class="hs-identifier hs-var">stripProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689097"><span class="hs-identifier hs-var">progDb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679689092"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679689092"><span class="hs-identifier hs-var">strip</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [FilePath] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runProgram"><span class="hs-identifier hs-var">runProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679689092"><span class="hs-identifier hs-var">strip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679689095"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689096"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><span class="annottext">Maybe ConfiguredProgram
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; OS -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-32"></span><span>                  </span><span class="hs-comment">-- Don't bother warning on windows, we don't expect them to</span><span>
</span><span id="line-33"></span><span>                  </span><span class="hs-comment">-- have the strip program anyway.</span><span>
</span><span id="line-34"></span><span>                  </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#warn"><span class="hs-identifier hs-var">warn</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Unable to strip executable or library '&quot;</span></span><span>
</span><span id="line-35"></span><span>                                   </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeBaseName"><span class="hs-identifier hs-var">takeBaseName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689096"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span>                                   </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;' (missing the 'strip' program)&quot;</span></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="annot"><a href="Distribution.Simple.Program.Strip.html#stripExe"><span class="hs-identifier hs-type">stripExe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span id="stripExe"><span class="annot"><span class="annottext">stripExe :: Verbosity -&gt; Platform -&gt; ProgramDb -&gt; FilePath -&gt; IO ()
</span><a href="Distribution.Simple.Program.Strip.html#stripExe"><span class="hs-identifier hs-var hs-var">stripExe</span></a></span></span><span> </span><span id="local-6989586621679689086"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689086"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span id="local-6989586621679689084"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679689084"><span class="hs-identifier hs-var">_arch</span></a></span></span><span> </span><span id="local-6989586621679689083"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679689083"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679689082"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689082"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679689081"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689081"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-40"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramDb -&gt; FilePath -&gt; [FilePath] -&gt; IO ()
</span><a href="Distribution.Simple.Program.Strip.html#runStrip"><span class="hs-identifier hs-var">runStrip</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689086"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689082"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689081"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679689080"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-41"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-42"></span><span>    </span><span id="local-6989586621679689080"><span class="annot"><span class="annottext">args :: [FilePath]
</span><a href="#local-6989586621679689080"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679689083"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-43"></span><span>       </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OSX"><span class="hs-identifier hs-var">OSX</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-x&quot;</span></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- By default, stripping the ghc binary on at least</span><span>
</span><span id="line-44"></span><span>                     </span><span class="hs-comment">-- some OS X installations causes:</span><span>
</span><span id="line-45"></span><span>                     </span><span class="hs-comment">--     HSbase-3.0.o: unknown symbol `_environ'&quot;</span><span>
</span><span id="line-46"></span><span>                     </span><span class="hs-comment">-- The -x flag fixes that.</span><span>
</span><span id="line-47"></span><span>       </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="annot"><a href="Distribution.Simple.Program.Strip.html#stripLib"><span class="hs-identifier hs-type">stripLib</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span id="stripLib"><span class="annot"><span class="annottext">stripLib :: Verbosity -&gt; Platform -&gt; ProgramDb -&gt; FilePath -&gt; IO ()
</span><a href="Distribution.Simple.Program.Strip.html#stripLib"><span class="hs-identifier hs-var hs-var">stripLib</span></a></span></span><span> </span><span id="local-6989586621679689078"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689078"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span id="local-6989586621679689077"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679689077"><span class="hs-identifier hs-var">arch</span></a></span></span><span> </span><span id="local-6989586621679689076"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679689076"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679689075"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689075"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679689074"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689074"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-51"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679689076"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-52"></span><span>    </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OSX"><span class="hs-identifier hs-var">OSX</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-comment">-- '--strip-unneeded' is not supported on OS X, iOS, AIX, or</span><span>
</span><span id="line-53"></span><span>           </span><span class="hs-comment">-- Solaris. See #1630.</span><span>
</span><span id="line-54"></span><span>           </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span>    </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#IOS"><span class="hs-identifier hs-var">IOS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span>    </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#AIX"><span class="hs-identifier hs-var">AIX</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span>    </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Solaris"><span class="hs-identifier hs-var">Solaris</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span>    </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-comment">-- Stripping triggers a bug in 'strip.exe' for</span><span>
</span><span id="line-59"></span><span>               </span><span class="hs-comment">-- libraries with lots identically named modules. See</span><span>
</span><span id="line-60"></span><span>               </span><span class="hs-comment">-- #1784.</span><span>
</span><span id="line-61"></span><span>               </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>    </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Linux"><span class="hs-identifier hs-var">Linux</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679689077"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; Arch -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="Distribution.System.html#I386"><span class="hs-identifier hs-var">I386</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-63"></span><span>      </span><span class="hs-comment">-- Versions of 'strip' on 32-bit Linux older than 2.18 are</span><span>
</span><span id="line-64"></span><span>      </span><span class="hs-comment">-- broken. See #2339.</span><span>
</span><span id="line-65"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679689068"><span class="annot"><span class="annottext">okVersion :: VersionRange
</span><a href="#local-6989586621679689068"><span class="hs-identifier hs-var hs-var">okVersion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#orLaterVersion"><span class="hs-identifier hs-var">orLaterVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">18</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe Version
</span><a href="Distribution.Simple.Program.Types.html#programVersion"><span class="hs-identifier hs-var hs-var">programVersion</span></a></span><span> </span><span class="annot"><span class="annottext">(ConfiguredProgram -&gt; Maybe Version)
-&gt; Maybe ConfiguredProgram -&gt; Maybe Version
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#stripProgram"><span class="hs-identifier hs-var">stripProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689075"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-67"></span><span>          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679689063"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679689063"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Version -&gt; VersionRange -&gt; Bool
</span><a href="Distribution.Types.VersionRange.html#withinRange"><span class="hs-identifier hs-var">withinRange</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679689063"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679689068"><span class="hs-identifier hs-var">okVersion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-68"></span><span>            </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramDb -&gt; FilePath -&gt; [FilePath] -&gt; IO ()
</span><a href="Distribution.Simple.Program.Strip.html#runStrip"><span class="hs-identifier hs-var">runStrip</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689078"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689075"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689074"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679689061"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-69"></span><span>          </span><span class="annot"><span class="annottext">Maybe Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#warn"><span class="hs-identifier hs-var">warn</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689078"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Unable to strip library '&quot;</span></span><span>
</span><span id="line-70"></span><span>                                </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeBaseName"><span class="hs-identifier hs-var">takeBaseName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689074"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>                                </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;' (version of 'strip' too old; &quot;</span></span><span>
</span><span id="line-72"></span><span>                                </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;requires &gt;= 2.18 on 32-bit Linux)&quot;</span></span><span>
</span><span id="line-73"></span><span>    </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramDb -&gt; FilePath -&gt; [FilePath] -&gt; IO ()
</span><a href="Distribution.Simple.Program.Strip.html#runStrip"><span class="hs-identifier hs-var">runStrip</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679689078"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679689075"><span class="hs-identifier hs-var">progdb</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679689074"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679689061"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-74"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-75"></span><span>    </span><span id="local-6989586621679689061"><span class="annot"><span class="annottext">args :: [FilePath]
</span><a href="#local-6989586621679689061"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;--strip-unneeded&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-76"></span></pre></body></html>